<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>悦定内容管理系统</title>
    <!--判断是否登陆-->
    <script type="text/javascript" src="../../vendor/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="../../js/config.js"></script>
    <script type="text/javascript" src="../../js/jquerySession.js"></script>
    <script type="text/javascript">
        if ($.session.get('token') == null) {
            alert("用户未登录！");
            window.location.href = "../../login.html"
        }
    </script>
</head>

<style type="text/css">

    .box {

        margin: 0px auto;
        width: 100%;

    }

    .box ul {

        margin: 20px auto;
        padding-left: 0px;
        width: 500px;

    }

    .box ul li {

        list-style-type: none;

    }

    .box ul li input {

        height: 24px;
        width: 250px;

    }

    .box ul li span, input {

        margin: 5px 10px;

    }

    .box ul li {

        text-align: center;

    }

    .box ul li img {

        line-height: 19px;

    }

    .box ul .division {

        height: 10px;
        border-bottom: dashed #eeeeee 1px;
        margin-bottom: 10px;

    }

    .box ul .vote_selection {

        text-align: center;
        vertical-align: bottom;
        height: 20px;

    }

    .box ul .vote_selection .add_btn {

        line-height: 20px;
        width: 16px;
        height: 16px;
        padding-bottom: 3px;
        border: 0px;
        background: url("../../images/add.png") no-repeat;

    }

    .box ul li .del_btn {

        line-height: 20px;
        width: 16px;
        height: 16px;
        padding-bottom: 3px;
        border: 0px;
        background: url("../../images/del.png") no-repeat;

    }

    .input_style {

        margin-left: 40px;
        padding-left: 0px;

    }

</style>
<body>
<div class="box">

    <form id="phoneNum">

        <ul id="voteList">

            <li class="division"></li>
            <li class="vote_selection">添加预警手机号<span><input class="add_btn" type="button" onclick="addSelection()"/>&nbsp;<input
                    type="button" class="del_btn" onclick="delSelection()"/></span></li>
            <li class="division"></li>
            <li><span>预警手机号1</span><input type="text" name="vote_selection"></li>

        </ul>

    </form>
</div>
<script>


    function delSelection() {

        var voteList = document.getElementById("voteList");
        var count = voteList.childNodes.length;

        count--;

        if (count > 7) {

            voteList.removeChild(voteList.childNodes[count]);

        }


    }


    function addSelection() {

        var voteList = document.getElementById("voteList");
        var new_li = document.createElement("li");
        var count = voteList.childNodes.length - 7;

        new_li.innerHTML = "<span>预警手机号" + count + "</span><input type=\"text\" name=\"vote_selection\">";

        voteList.appendChild(new_li);


    }


</script>



</body>
</html>